//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension Translate {
    // MARK: Enums

    public enum Brevity: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case on = "ON"
        public var description: String { return self.rawValue }
    }

    public enum Directionality: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case multi = "MULTI"
        case uni = "UNI"
        public var description: String { return self.rawValue }
    }

    public enum DisplayLanguageCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case de = "de"
        case en = "en"
        case es = "es"
        case fr = "fr"
        case it = "it"
        case ja = "ja"
        case ko = "ko"
        case pt = "pt"
        case zh = "zh"
        case zhTw = "zh-TW"
        public var description: String { return self.rawValue }
    }

    public enum EncryptionKeyType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case kms = "KMS"
        public var description: String { return self.rawValue }
    }

    public enum Formality: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case formal = "FORMAL"
        case informal = "INFORMAL"
        public var description: String { return self.rawValue }
    }

    public enum JobStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case completed = "COMPLETED"
        case completedWithError = "COMPLETED_WITH_ERROR"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case stopRequested = "STOP_REQUESTED"
        case stopped = "STOPPED"
        case submitted = "SUBMITTED"
        public var description: String { return self.rawValue }
    }

    public enum MergeStrategy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case overwrite = "OVERWRITE"
        public var description: String { return self.rawValue }
    }

    public enum ParallelDataFormat: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case csv = "CSV"
        case tmx = "TMX"
        case tsv = "TSV"
        public var description: String { return self.rawValue }
    }

    public enum ParallelDataStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum Profanity: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case mask = "MASK"
        public var description: String { return self.rawValue }
    }

    public enum TerminologyDataFormat: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case csv = "CSV"
        case tmx = "TMX"
        case tsv = "TSV"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AppliedTerminology: AWSDecodableShape {
        /// The name of the custom terminology applied to the input text by Amazon Translate for the translated text response.
        public let name: String?
        /// The specific terms of the custom terminology applied to the input text by Amazon Translate for the translated text response. A maximum of 250 terms will be returned, and the specific terms applied will be the first 250 terms in the source text.
        public let terms: [Term]?

        @inlinable
        public init(name: String? = nil, terms: [Term]? = nil) {
            self.name = name
            self.terms = terms
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case terms = "Terms"
        }
    }

    public struct CreateParallelDataRequest: AWSEncodableShape {
        /// A unique identifier for the request. This token is automatically generated when you use Amazon Translate through an AWS SDK.
        public let clientToken: String
        /// A custom description for the parallel data resource in Amazon Translate.
        public let description: String?
        public let encryptionKey: EncryptionKey?
        /// A custom name for the parallel data resource in Amazon Translate. You must assign a name that is unique in the account and region.
        public let name: String
        /// Specifies the format and S3 location of the parallel data input file.
        public let parallelDataConfig: ParallelDataConfig
        /// Tags to be associated with this resource. A tag is a key-value pair that adds metadata to a resource. Each tag key for the resource must be unique. For more information, see  Tagging your resources.
        public let tags: [Tag]?

        @inlinable
        public init(clientToken: String = CreateParallelDataRequest.idempotencyToken(), description: String? = nil, encryptionKey: EncryptionKey? = nil, name: String, parallelDataConfig: ParallelDataConfig, tags: [Tag]? = nil) {
            self.clientToken = clientToken
            self.description = description
            self.encryptionKey = encryptionKey
            self.name = name
            self.parallelDataConfig = parallelDataConfig
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.description, name: "description", parent: name, max: 256)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\P{M}\\p{M}]{0,256}$")
            try self.encryptionKey?.validate(name: "\(name).encryptionKey")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z0-9-]_?)+$")
            try self.parallelDataConfig.validate(name: "\(name).parallelDataConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case description = "Description"
            case encryptionKey = "EncryptionKey"
            case name = "Name"
            case parallelDataConfig = "ParallelDataConfig"
            case tags = "Tags"
        }
    }

    public struct CreateParallelDataResponse: AWSDecodableShape {
        /// The custom name that you assigned to the parallel data resource.
        public let name: String?
        /// The status of the parallel data resource. When the resource is ready for you to use, the status is ACTIVE.
        public let status: ParallelDataStatus?

        @inlinable
        public init(name: String? = nil, status: ParallelDataStatus? = nil) {
            self.name = name
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case status = "Status"
        }
    }

    public struct DeleteParallelDataRequest: AWSEncodableShape {
        /// The name of the parallel data resource that is being deleted.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z0-9-]_?)+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DeleteParallelDataResponse: AWSDecodableShape {
        /// The name of the parallel data resource that is being deleted.
        public let name: String?
        /// The status of the parallel data deletion.
        public let status: ParallelDataStatus?

        @inlinable
        public init(name: String? = nil, status: ParallelDataStatus? = nil) {
            self.name = name
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case status = "Status"
        }
    }

    public struct DeleteTerminologyRequest: AWSEncodableShape {
        /// The name of the custom terminology being deleted.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z0-9-]_?)+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DescribeTextTranslationJobRequest: AWSEncodableShape {
        /// The identifier that Amazon Translate generated for the job. The StartTextTranslationJob operation returns this identifier in its response.
        public let jobId: String

        @inlinable
        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeTextTranslationJobResponse: AWSDecodableShape {
        /// An object that contains the properties associated with an asynchronous batch translation job.
        public let textTranslationJobProperties: TextTranslationJobProperties?

        @inlinable
        public init(textTranslationJobProperties: TextTranslationJobProperties? = nil) {
            self.textTranslationJobProperties = textTranslationJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case textTranslationJobProperties = "TextTranslationJobProperties"
        }
    }

    public struct DetectedLanguageLowConfidenceException: AWSErrorShape {
        /// The language code of the auto-detected language from Amazon Comprehend.
        public let detectedLanguageCode: String?
        public let message: String?

        @inlinable
        public init(detectedLanguageCode: String? = nil, message: String? = nil) {
            self.detectedLanguageCode = detectedLanguageCode
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case detectedLanguageCode = "DetectedLanguageCode"
            case message = "Message"
        }
    }

    public struct Document: AWSEncodableShape {
        /// The Contentfield type is Binary large object (blob). This object contains the document content converted into base64-encoded binary data.    If you use one of the AWS SDKs, the SDK performs the Base64-encoding on this field before sending the request.
        public let content: AWSBase64Data
        /// Describes the format of the document. You can specify one of the following:    text/html - The input data consists of HTML content.  Amazon Translate translates only the text in the HTML element.    text/plain - The input data consists of unformatted text.  Amazon Translate translates every character in the content.     application/vnd.openxmlformats-officedocument.wordprocessingml.document - The  input data consists of a Word document (.docx).
        public let contentType: String

        @inlinable
        public init(content: AWSBase64Data, contentType: String) {
            self.content = content
            self.contentType = contentType
        }

        public func validate(name: String) throws {
            try self.validate(self.content, name: "content", parent: name, max: 102400)
            try self.validate(self.contentType, name: "contentType", parent: name, max: 256)
            try self.validate(self.contentType, name: "contentType", parent: name, pattern: "^[-\\w.]+\\/[-\\w.+]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case content = "Content"
            case contentType = "ContentType"
        }
    }

    public struct EncryptionKey: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the encryption key being used to encrypt this object.
        public let id: String
        /// The type of encryption key used by Amazon Translate to encrypt this object.
        public let type: EncryptionKeyType

        @inlinable
        public init(id: String, type: EncryptionKeyType) {
            self.id = id
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 400)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^(arn:aws((-us-gov)|(-iso)|(-iso-b)|(-cn))?:kms:)?([a-z]{2}-[a-z]+(-[a-z]+)?-\\d:)?(\\d{12}:)?(((key/)?[a-zA-Z0-9-_]+)|(alias/[a-zA-Z0-9:/_-]+))$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case type = "Type"
        }
    }

    public struct GetParallelDataRequest: AWSEncodableShape {
        /// The name of the parallel data resource that is being retrieved.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z0-9-]_?)+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct GetParallelDataResponse: AWSDecodableShape {
        /// The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to create a parallel data resource. The location is returned as a presigned URL to that has a 30-minute expiration.
        public let auxiliaryDataLocation: ParallelDataDataLocation?
        /// The Amazon S3 location of the most recent parallel data input file that was successfully imported into Amazon Translate. The location is returned as a presigned URL that has a 30-minute expiration.   Amazon Translate doesn't scan all input files for the risk of CSV injection attacks.  CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it. Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.
        public let dataLocation: ParallelDataDataLocation?
        /// The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to update a parallel data resource. The location is returned as a presigned URL to that has a 30-minute expiration.
        public let latestUpdateAttemptAuxiliaryDataLocation: ParallelDataDataLocation?
        /// The properties of the parallel data resource that is being retrieved.
        public let parallelDataProperties: ParallelDataProperties?

        @inlinable
        public init(auxiliaryDataLocation: ParallelDataDataLocation? = nil, dataLocation: ParallelDataDataLocation? = nil, latestUpdateAttemptAuxiliaryDataLocation: ParallelDataDataLocation? = nil, parallelDataProperties: ParallelDataProperties? = nil) {
            self.auxiliaryDataLocation = auxiliaryDataLocation
            self.dataLocation = dataLocation
            self.latestUpdateAttemptAuxiliaryDataLocation = latestUpdateAttemptAuxiliaryDataLocation
            self.parallelDataProperties = parallelDataProperties
        }

        private enum CodingKeys: String, CodingKey {
            case auxiliaryDataLocation = "AuxiliaryDataLocation"
            case dataLocation = "DataLocation"
            case latestUpdateAttemptAuxiliaryDataLocation = "LatestUpdateAttemptAuxiliaryDataLocation"
            case parallelDataProperties = "ParallelDataProperties"
        }
    }

    public struct GetTerminologyRequest: AWSEncodableShape {
        /// The name of the custom terminology being retrieved.
        public let name: String
        /// The data format of the custom terminology being retrieved. If you don't specify this parameter, Amazon Translate returns a file with the same format as the file that was imported to create the terminology.  If you specify this parameter when you retrieve a multi-directional terminology resource, you must specify the same format as the input file that was imported to create it. Otherwise, Amazon Translate throws an error.
        public let terminologyDataFormat: TerminologyDataFormat?

        @inlinable
        public init(name: String, terminologyDataFormat: TerminologyDataFormat? = nil) {
            self.name = name
            self.terminologyDataFormat = terminologyDataFormat
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z0-9-]_?)+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case terminologyDataFormat = "TerminologyDataFormat"
        }
    }

    public struct GetTerminologyResponse: AWSDecodableShape {
        /// The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to create a terminology resource. The location is returned as a presigned URL to that has a 30-minute expiration.
        public let auxiliaryDataLocation: TerminologyDataLocation?
        /// The Amazon S3 location of the most recent custom terminology input file that was successfully imported into Amazon Translate. The location is returned as a presigned URL that has a 30-minute expiration.   Amazon Translate doesn't scan all input files for the risk of CSV injection attacks.  CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it. Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.
        public let terminologyDataLocation: TerminologyDataLocation?
        /// The properties of the custom terminology being retrieved.
        public let terminologyProperties: TerminologyProperties?

        @inlinable
        public init(auxiliaryDataLocation: TerminologyDataLocation? = nil, terminologyDataLocation: TerminologyDataLocation? = nil, terminologyProperties: TerminologyProperties? = nil) {
            self.auxiliaryDataLocation = auxiliaryDataLocation
            self.terminologyDataLocation = terminologyDataLocation
            self.terminologyProperties = terminologyProperties
        }

        private enum CodingKeys: String, CodingKey {
            case auxiliaryDataLocation = "AuxiliaryDataLocation"
            case terminologyDataLocation = "TerminologyDataLocation"
            case terminologyProperties = "TerminologyProperties"
        }
    }

    public struct ImportTerminologyRequest: AWSEncodableShape {
        /// The description of the custom terminology being imported.
        public let description: String?
        /// The encryption key for the custom terminology being imported.
        public let encryptionKey: EncryptionKey?
        /// The merge strategy of the custom terminology being imported. Currently, only the OVERWRITE merge strategy is supported. In this case, the imported terminology will overwrite an existing terminology of the same name.
        public let mergeStrategy: MergeStrategy
        /// The name of the custom terminology being imported.
        public let name: String
        /// Tags to be associated with this resource. A tag is a key-value pair that adds metadata to a resource. Each tag key for the resource must be unique. For more information, see  Tagging your resources.
        public let tags: [Tag]?
        /// The terminology data for the custom terminology being imported.
        public let terminologyData: TerminologyData

        @inlinable
        public init(description: String? = nil, encryptionKey: EncryptionKey? = nil, mergeStrategy: MergeStrategy, name: String, tags: [Tag]? = nil, terminologyData: TerminologyData) {
            self.description = description
            self.encryptionKey = encryptionKey
            self.mergeStrategy = mergeStrategy
            self.name = name
            self.tags = tags
            self.terminologyData = terminologyData
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 256)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\P{M}\\p{M}]{0,256}$")
            try self.encryptionKey?.validate(name: "\(name).encryptionKey")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z0-9-]_?)+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
            try self.terminologyData.validate(name: "\(name).terminologyData")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case encryptionKey = "EncryptionKey"
            case mergeStrategy = "MergeStrategy"
            case name = "Name"
            case tags = "Tags"
            case terminologyData = "TerminologyData"
        }
    }

    public struct ImportTerminologyResponse: AWSDecodableShape {
        /// The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to create a terminology resource. The location is returned as a presigned URL to that has a 30 minute expiration.
        public let auxiliaryDataLocation: TerminologyDataLocation?
        /// The properties of the custom terminology being imported.
        public let terminologyProperties: TerminologyProperties?

        @inlinable
        public init(auxiliaryDataLocation: TerminologyDataLocation? = nil, terminologyProperties: TerminologyProperties? = nil) {
            self.auxiliaryDataLocation = auxiliaryDataLocation
            self.terminologyProperties = terminologyProperties
        }

        private enum CodingKeys: String, CodingKey {
            case auxiliaryDataLocation = "AuxiliaryDataLocation"
            case terminologyProperties = "TerminologyProperties"
        }
    }

    public struct InputDataConfig: AWSEncodableShape & AWSDecodableShape {
        /// Describes the format of the data that you submit to Amazon Translate as input. You can specify one of the following multipurpose internet mail extension (MIME) types:    text/html: The input data consists of one or more HTML files. Amazon Translate translates only the text that resides in the html element in each file.    text/plain: The input data consists of one or more unformatted text files. Amazon Translate translates every character in this type of input.    application/vnd.openxmlformats-officedocument.wordprocessingml.document: The input data consists of one or more Word documents (.docx).    application/vnd.openxmlformats-officedocument.presentationml.presentation: The input data consists of one or more PowerPoint Presentation files (.pptx).    application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: The input data consists of one or more Excel Workbook files (.xlsx).    application/x-xliff+xml: The input data consists of one or more XML Localization Interchange File Format (XLIFF) files (.xlf). Amazon Translate supports only XLIFF version 1.2.    If you structure your input data as HTML, ensure that you set this parameter to text/html. By doing so, you cut costs by limiting the translation to the contents of the html element in each file. Otherwise, if you set this parameter to text/plain, your costs will cover the translation of every character.
        public let contentType: String
        /// The URI of the AWS S3 folder that contains the input files. Amazon Translate translates all the files in the folder and all its sub-folders. The folder must be in the same Region as the API endpoint you are calling.
        public let s3Uri: String

        @inlinable
        public init(contentType: String, s3Uri: String) {
            self.contentType = contentType
            self.s3Uri = s3Uri
        }

        public func validate(name: String) throws {
            try self.validate(self.contentType, name: "contentType", parent: name, max: 256)
            try self.validate(self.contentType, name: "contentType", parent: name, pattern: "^[-\\w.]+\\/[-\\w.+]+$")
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case contentType = "ContentType"
            case s3Uri = "S3Uri"
        }
    }

    public struct JobDetails: AWSDecodableShape {
        /// The number of documents that could not be processed during a translation job.
        public let documentsWithErrorsCount: Int?
        /// The number of documents used as input in a translation job.
        public let inputDocumentsCount: Int?
        /// The number of documents successfully processed during a translation job.
        public let translatedDocumentsCount: Int?

        @inlinable
        public init(documentsWithErrorsCount: Int? = nil, inputDocumentsCount: Int? = nil, translatedDocumentsCount: Int? = nil) {
            self.documentsWithErrorsCount = documentsWithErrorsCount
            self.inputDocumentsCount = inputDocumentsCount
            self.translatedDocumentsCount = translatedDocumentsCount
        }

        private enum CodingKeys: String, CodingKey {
            case documentsWithErrorsCount = "DocumentsWithErrorsCount"
            case inputDocumentsCount = "InputDocumentsCount"
            case translatedDocumentsCount = "TranslatedDocumentsCount"
        }
    }

    public struct Language: AWSDecodableShape {
        /// Language code for the supported language.
        public let languageCode: String
        /// Language name of the supported language.
        public let languageName: String

        @inlinable
        public init(languageCode: String, languageName: String) {
            self.languageCode = languageCode
            self.languageName = languageName
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case languageName = "LanguageName"
        }
    }

    public struct ListLanguagesRequest: AWSEncodableShape {
        /// The language code for the language to use to display the language names in the response. The language code is en by default.
        public let displayLanguageCode: DisplayLanguageCode?
        /// The maximum number of results to return in each response.
        public let maxResults: Int?
        /// Include the NextToken value to fetch the next group of supported languages.
        public let nextToken: String?

        @inlinable
        public init(displayLanguageCode: DisplayLanguageCode? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.displayLanguageCode = displayLanguageCode
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\p{ASCII}{0,8192}$")
        }

        private enum CodingKeys: String, CodingKey {
            case displayLanguageCode = "DisplayLanguageCode"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListLanguagesResponse: AWSDecodableShape {
        /// The language code passed in with the request.
        public let displayLanguageCode: DisplayLanguageCode?
        /// The list of supported languages.
        public let languages: [Language]?
        ///  If the response does not include all remaining results, use the NextToken in the next request to fetch the next group of supported languages.
        public let nextToken: String?

        @inlinable
        public init(displayLanguageCode: DisplayLanguageCode? = nil, languages: [Language]? = nil, nextToken: String? = nil) {
            self.displayLanguageCode = displayLanguageCode
            self.languages = languages
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case displayLanguageCode = "DisplayLanguageCode"
            case languages = "Languages"
            case nextToken = "NextToken"
        }
    }

    public struct ListParallelDataRequest: AWSEncodableShape {
        /// The maximum number of parallel data resources returned for each request.
        public let maxResults: Int?
        /// A string that specifies the next page of results to return in a paginated response.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\p{ASCII}{0,8192}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListParallelDataResponse: AWSDecodableShape {
        /// The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.
        public let nextToken: String?
        /// The properties of the parallel data resources returned by this request.
        public let parallelDataPropertiesList: [ParallelDataProperties]?

        @inlinable
        public init(nextToken: String? = nil, parallelDataPropertiesList: [ParallelDataProperties]? = nil) {
            self.nextToken = nextToken
            self.parallelDataPropertiesList = parallelDataPropertiesList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case parallelDataPropertiesList = "ParallelDataPropertiesList"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the given Amazon Translate resource you are querying.
        public let resourceArn: String

        @inlinable
        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 512)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// Tags associated with the Amazon Translate resource being queried. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Translate. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?

        @inlinable
        public init(tags: [Tag]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct ListTerminologiesRequest: AWSEncodableShape {
        /// The maximum number of custom terminologies returned per list request.
        public let maxResults: Int?
        /// If the result of the request to ListTerminologies was truncated, include the NextToken to fetch the next group of custom terminologies.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\p{ASCII}{0,8192}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListTerminologiesResponse: AWSDecodableShape {
        ///  If the response to the ListTerminologies was truncated, the NextToken fetches the next group of custom terminologies.
        public let nextToken: String?
        /// The properties list of the custom terminologies returned on the list request.
        public let terminologyPropertiesList: [TerminologyProperties]?

        @inlinable
        public init(nextToken: String? = nil, terminologyPropertiesList: [TerminologyProperties]? = nil) {
            self.nextToken = nextToken
            self.terminologyPropertiesList = terminologyPropertiesList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case terminologyPropertiesList = "TerminologyPropertiesList"
        }
    }

    public struct ListTextTranslationJobsRequest: AWSEncodableShape {
        /// The parameters that specify which batch translation jobs to retrieve. Filters include job name, job status, and submission time. You can only set one filter at a time.
        public let filter: TextTranslationJobFilter?
        /// The maximum number of results to return in each page. The default value is 100.
        public let maxResults: Int?
        /// The token to request the next page of results.
        public let nextToken: String?

        @inlinable
        public init(filter: TextTranslationJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\p{ASCII}{0,8192}$")
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListTextTranslationJobsResponse: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// A list containing the properties of each job that is returned.
        public let textTranslationJobPropertiesList: [TextTranslationJobProperties]?

        @inlinable
        public init(nextToken: String? = nil, textTranslationJobPropertiesList: [TextTranslationJobProperties]? = nil) {
            self.nextToken = nextToken
            self.textTranslationJobPropertiesList = textTranslationJobPropertiesList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case textTranslationJobPropertiesList = "TextTranslationJobPropertiesList"
        }
    }

    public struct OutputDataConfig: AWSEncodableShape & AWSDecodableShape {
        public let encryptionKey: EncryptionKey?
        /// The URI of the S3 folder that contains a translation job's output file. The folder must be in the same Region as the API endpoint that you are calling.
        public let s3Uri: String

        @inlinable
        public init(encryptionKey: EncryptionKey? = nil, s3Uri: String) {
            self.encryptionKey = encryptionKey
            self.s3Uri = s3Uri
        }

        public func validate(name: String) throws {
            try self.encryptionKey?.validate(name: "\(name).encryptionKey")
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case encryptionKey = "EncryptionKey"
            case s3Uri = "S3Uri"
        }
    }

    public struct ParallelDataConfig: AWSEncodableShape & AWSDecodableShape {
        /// The format of the parallel data input file.
        public let format: ParallelDataFormat?
        /// The URI of the Amazon S3 folder that contains the parallel data input file. The folder must be in the same Region as the API endpoint you are calling.
        public let s3Uri: String?

        @inlinable
        public init(format: ParallelDataFormat? = nil, s3Uri: String? = nil) {
            self.format = format
            self.s3Uri = s3Uri
        }

        public func validate(name: String) throws {
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case format = "Format"
            case s3Uri = "S3Uri"
        }
    }

    public struct ParallelDataDataLocation: AWSDecodableShape {
        /// The Amazon S3 location of the parallel data input file. The location is returned as a presigned URL to that has a 30-minute expiration.   Amazon Translate doesn't scan all input files for the risk of CSV injection attacks.  CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it. Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.
        public let location: String
        /// Describes the repository that contains the parallel data input file.
        public let repositoryType: String

        @inlinable
        public init(location: String, repositoryType: String) {
            self.location = location
            self.repositoryType = repositoryType
        }

        private enum CodingKeys: String, CodingKey {
            case location = "Location"
            case repositoryType = "RepositoryType"
        }
    }

    public struct ParallelDataProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the parallel data resource.
        public let arn: String?
        /// The time at which the parallel data resource was created.
        public let createdAt: Date?
        /// The description assigned to the parallel data resource.
        public let description: String?
        public let encryptionKey: EncryptionKey?
        /// The number of records unsuccessfully imported from the parallel data input file.
        public let failedRecordCount: Int64?
        /// The number of UTF-8 characters that Amazon Translate imported from the parallel data input file. This number includes only the characters in your translation examples. It does not include characters that are used to format your file. For example, if you provided a Translation Memory Exchange (.tmx) file, this number does not include the tags.
        public let importedDataSize: Int64?
        /// The number of records successfully imported from the parallel data input file.
        public let importedRecordCount: Int64?
        /// The time at which the parallel data resource was last updated.
        public let lastUpdatedAt: Date?
        /// The time that the most recent update was attempted.
        public let latestUpdateAttemptAt: Date?
        /// The status of the most recent update attempt for the parallel data resource.
        public let latestUpdateAttemptStatus: ParallelDataStatus?
        /// Additional information from Amazon Translate about the parallel data resource.
        public let message: String?
        /// The custom name assigned to the parallel data resource.
        public let name: String?
        /// Specifies the format and S3 location of the parallel data input file.
        public let parallelDataConfig: ParallelDataConfig?
        /// The number of items in the input file that Amazon Translate skipped when you created or updated the parallel data resource. For example, Amazon Translate skips empty records, empty target texts, and empty lines.
        public let skippedRecordCount: Int64?
        /// The source language of the translations in the parallel data file.
        public let sourceLanguageCode: String?
        /// The status of the parallel data resource. When the parallel data is ready for you to use, the status is ACTIVE.
        public let status: ParallelDataStatus?
        /// The language codes for the target languages available in the parallel data file. All possible target languages are returned as an array.
        public let targetLanguageCodes: [String]?

        @inlinable
        public init(arn: String? = nil, createdAt: Date? = nil, description: String? = nil, encryptionKey: EncryptionKey? = nil, failedRecordCount: Int64? = nil, importedDataSize: Int64? = nil, importedRecordCount: Int64? = nil, lastUpdatedAt: Date? = nil, latestUpdateAttemptAt: Date? = nil, latestUpdateAttemptStatus: ParallelDataStatus? = nil, message: String? = nil, name: String? = nil, parallelDataConfig: ParallelDataConfig? = nil, skippedRecordCount: Int64? = nil, sourceLanguageCode: String? = nil, status: ParallelDataStatus? = nil, targetLanguageCodes: [String]? = nil) {
            self.arn = arn
            self.createdAt = createdAt
            self.description = description
            self.encryptionKey = encryptionKey
            self.failedRecordCount = failedRecordCount
            self.importedDataSize = importedDataSize
            self.importedRecordCount = importedRecordCount
            self.lastUpdatedAt = lastUpdatedAt
            self.latestUpdateAttemptAt = latestUpdateAttemptAt
            self.latestUpdateAttemptStatus = latestUpdateAttemptStatus
            self.message = message
            self.name = name
            self.parallelDataConfig = parallelDataConfig
            self.skippedRecordCount = skippedRecordCount
            self.sourceLanguageCode = sourceLanguageCode
            self.status = status
            self.targetLanguageCodes = targetLanguageCodes
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case createdAt = "CreatedAt"
            case description = "Description"
            case encryptionKey = "EncryptionKey"
            case failedRecordCount = "FailedRecordCount"
            case importedDataSize = "ImportedDataSize"
            case importedRecordCount = "ImportedRecordCount"
            case lastUpdatedAt = "LastUpdatedAt"
            case latestUpdateAttemptAt = "LatestUpdateAttemptAt"
            case latestUpdateAttemptStatus = "LatestUpdateAttemptStatus"
            case message = "Message"
            case name = "Name"
            case parallelDataConfig = "ParallelDataConfig"
            case skippedRecordCount = "SkippedRecordCount"
            case sourceLanguageCode = "SourceLanguageCode"
            case status = "Status"
            case targetLanguageCodes = "TargetLanguageCodes"
        }
    }

    public struct StartTextTranslationJobRequest: AWSEncodableShape {
        /// A unique identifier for the request. This token is generated for you when using the Amazon Translate SDK.
        public let clientToken: String
        /// The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role that grants Amazon Translate read access to your input data. For more information, see Identity and access management .
        public let dataAccessRoleArn: String
        /// Specifies the format and location of the input documents for the translation job.
        public let inputDataConfig: InputDataConfig
        /// The name of the batch translation job to be performed.
        public let jobName: String?
        /// Specifies the S3 folder to which your job output will be saved.
        public let outputDataConfig: OutputDataConfig
        /// The name of a parallel data resource to add to the translation job. This resource consists of examples that show how you want segments of text to be translated. If you specify multiple target languages for the job, the parallel data file must include translations for all the target languages. When you add parallel data to a translation job, you create an Active Custom Translation job.  This parameter accepts only one parallel data resource.  Active Custom Translation jobs are priced at a higher rate than other jobs that don't use parallel data. For more information, see Amazon Translate pricing.  For a list of available parallel data resources, use the ListParallelData operation. For more information, see  Customizing your translations with parallel data.
        public let parallelDataNames: [String]?
        /// Settings to configure your translation output. You can configure the following options:   Brevity: not supported.   Formality: sets the formality level of the output text.   Profanity: masks profane words and phrases in your translation output.
        public let settings: TranslationSettings?
        /// The language code of the input language. Specify the language if all input documents share the same language. If you don't know the language of the source files, or your input documents contains different source languages, select auto. Amazon Translate auto detects the source language for each input document. For a list of supported language codes, see Supported languages.
        public let sourceLanguageCode: String
        /// The target languages of the translation job. Enter up to 10 language codes. Each input file is translated into each target language. Each language code is 2 or 5 characters long. For a list of language codes, see Supported languages.
        public let targetLanguageCodes: [String]
        /// The name of a custom terminology resource to add to the translation job. This resource lists examples source terms and the desired translation for each term. This parameter accepts only one custom terminology resource. If you specify multiple target languages for the job, translate uses the designated terminology for each requested target language that has an entry for the source term in the terminology file. For a list of available custom terminology resources, use the ListTerminologies operation. For more information, see Custom terminology.
        public let terminologyNames: [String]?

        @inlinable
        public init(clientToken: String = StartTextTranslationJobRequest.idempotencyToken(), dataAccessRoleArn: String, inputDataConfig: InputDataConfig, jobName: String? = nil, outputDataConfig: OutputDataConfig, parallelDataNames: [String]? = nil, settings: TranslationSettings? = nil, sourceLanguageCode: String, targetLanguageCodes: [String], terminologyNames: [String]? = nil) {
            self.clientToken = clientToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.outputDataConfig = outputDataConfig
            self.parallelDataNames = parallelDataNames
            self.settings = settings
            self.sourceLanguageCode = sourceLanguageCode
            self.targetLanguageCodes = targetLanguageCodes
            self.terminologyNames = terminologyNames
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.parallelDataNames?.forEach {
                try validate($0, name: "parallelDataNames[]", parent: name, max: 256)
                try validate($0, name: "parallelDataNames[]", parent: name, min: 1)
                try validate($0, name: "parallelDataNames[]", parent: name, pattern: "^([A-Za-z0-9-]_?)+$")
            }
            try self.validate(self.sourceLanguageCode, name: "sourceLanguageCode", parent: name, max: 5)
            try self.validate(self.sourceLanguageCode, name: "sourceLanguageCode", parent: name, min: 2)
            try self.targetLanguageCodes.forEach {
                try validate($0, name: "targetLanguageCodes[]", parent: name, max: 5)
                try validate($0, name: "targetLanguageCodes[]", parent: name, min: 2)
            }
            try self.validate(self.targetLanguageCodes, name: "targetLanguageCodes", parent: name, min: 1)
            try self.terminologyNames?.forEach {
                try validate($0, name: "terminologyNames[]", parent: name, max: 256)
                try validate($0, name: "terminologyNames[]", parent: name, min: 1)
                try validate($0, name: "terminologyNames[]", parent: name, pattern: "^([A-Za-z0-9-]_?)+$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case outputDataConfig = "OutputDataConfig"
            case parallelDataNames = "ParallelDataNames"
            case settings = "Settings"
            case sourceLanguageCode = "SourceLanguageCode"
            case targetLanguageCodes = "TargetLanguageCodes"
            case terminologyNames = "TerminologyNames"
        }
    }

    public struct StartTextTranslationJobResponse: AWSDecodableShape {
        /// The identifier generated for the job. To get the status of a job, use this ID with the DescribeTextTranslationJob operation.
        public let jobId: String?
        /// The status of the job. Possible values include:    SUBMITTED - The job has been received and is queued for processing.    IN_PROGRESS - Amazon Translate is processing the job.    COMPLETED - The job was successfully completed and the output is available.    COMPLETED_WITH_ERROR - The job was completed with errors. The errors can be analyzed in the job's output.    FAILED - The job did not complete. To get details, use the DescribeTextTranslationJob operation.    STOP_REQUESTED - The user who started the job has requested that it be stopped.    STOPPED - The job has been stopped.
        public let jobStatus: JobStatus?

        @inlinable
        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StopTextTranslationJobRequest: AWSEncodableShape {
        /// The job ID of the job to be stopped.
        public let jobId: String

        @inlinable
        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct StopTextTranslationJobResponse: AWSDecodableShape {
        /// The job ID of the stopped batch translation job.
        public let jobId: String?
        /// The status of the designated job. Upon successful completion, the job's status will be STOPPED.
        public let jobStatus: JobStatus?

        @inlinable
        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The initial part of a key-value pair that forms a tag associated with a given resource.
        public let key: String
        ///  The second part of a key-value pair that forms a tag associated with a given resource.
        public let value: String

        @inlinable
        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the given Amazon Translate resource to which you want to associate the tags.
        public let resourceArn: String
        /// Tags being associated with a specific Amazon Translate resource. There can be a maximum of 50 tags (both existing and pending) associated with a specific resource.
        public let tags: [Tag]

        @inlinable
        public init(resourceArn: String, tags: [Tag]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 512)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct Term: AWSDecodableShape {
        /// The source text of the term being translated by the custom terminology.
        public let sourceText: String?
        /// The target text of the term being translated by the custom terminology.
        public let targetText: String?

        @inlinable
        public init(sourceText: String? = nil, targetText: String? = nil) {
            self.sourceText = sourceText
            self.targetText = targetText
        }

        private enum CodingKeys: String, CodingKey {
            case sourceText = "SourceText"
            case targetText = "TargetText"
        }
    }

    public struct TerminologyData: AWSEncodableShape {
        /// The directionality of your terminology resource indicates whether it has one source language (uni-directional) or multiple (multi-directional).  UNI  The terminology resource has one source language (for example, the first column in a CSV file), and all of its other languages are target languages.   MULTI  Any language in the terminology resource can be the source language or a target language. A single multi-directional terminology resource can be used for jobs that translate different language pairs. For example, if the terminology contains English and Spanish terms, it can be used for jobs that translate English to Spanish and Spanish to English.   When you create a custom terminology resource without specifying the directionality, it behaves as uni-directional terminology, although this parameter will have a null value.
        public let directionality: Directionality?
        /// The file containing the custom terminology data. Your version of the AWS SDK performs a Base64-encoding on this field before sending a request to the AWS service. Users of the SDK should not perform Base64-encoding themselves.
        public let file: AWSBase64Data
        /// The data format of the custom terminology.
        public let format: TerminologyDataFormat

        @inlinable
        public init(directionality: Directionality? = nil, file: AWSBase64Data, format: TerminologyDataFormat) {
            self.directionality = directionality
            self.file = file
            self.format = format
        }

        public func validate(name: String) throws {
            try self.validate(self.file, name: "file", parent: name, max: 10485760)
        }

        private enum CodingKeys: String, CodingKey {
            case directionality = "Directionality"
            case file = "File"
            case format = "Format"
        }
    }

    public struct TerminologyDataLocation: AWSDecodableShape {
        /// The Amazon S3 location of the most recent custom terminology input file that was successfully imported into Amazon Translate. The location is returned as a presigned URL that has a 30-minute expiration .   Amazon Translate doesn't scan all input files for the risk of CSV injection attacks.  CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it. Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.
        public let location: String
        /// The repository type for the custom terminology data.
        public let repositoryType: String

        @inlinable
        public init(location: String, repositoryType: String) {
            self.location = location
            self.repositoryType = repositoryType
        }

        private enum CodingKeys: String, CodingKey {
            case location = "Location"
            case repositoryType = "RepositoryType"
        }
    }

    public struct TerminologyProperties: AWSDecodableShape {
        ///  The Amazon Resource Name (ARN) of the custom terminology.
        public let arn: String?
        /// The time at which the custom terminology was created, based on the timestamp.
        public let createdAt: Date?
        /// The description of the custom terminology properties.
        public let description: String?
        /// The directionality of your terminology resource indicates whether it has one source language (uni-directional) or multiple (multi-directional).   UNI  The terminology resource has one source language (the first column in a CSV file), and all of its other languages are target languages.  MULTI  Any language in the terminology resource can be the source language.
        public let directionality: Directionality?
        /// The encryption key for the custom terminology.
        public let encryptionKey: EncryptionKey?
        /// The format of the custom terminology input file.
        public let format: TerminologyDataFormat?
        /// The time at which the custom terminology was last update, based on the timestamp.
        public let lastUpdatedAt: Date?
        /// Additional information from Amazon Translate about the terminology resource.
        public let message: String?
        /// The name of the custom terminology.
        public let name: String?
        /// The size of the file used when importing a custom terminology.
        public let sizeBytes: Int?
        /// The number of terms in the input file that Amazon Translate skipped when you created or updated the terminology resource.
        public let skippedTermCount: Int?
        /// The language code for the source text of the translation request for which the custom terminology is being used.
        public let sourceLanguageCode: String?
        /// The language codes for the target languages available with the custom terminology resource. All possible target languages are returned in array.
        public let targetLanguageCodes: [String]?
        /// The number of terms included in the custom terminology.
        public let termCount: Int?

        @inlinable
        public init(arn: String? = nil, createdAt: Date? = nil, description: String? = nil, directionality: Directionality? = nil, encryptionKey: EncryptionKey? = nil, format: TerminologyDataFormat? = nil, lastUpdatedAt: Date? = nil, message: String? = nil, name: String? = nil, sizeBytes: Int? = nil, skippedTermCount: Int? = nil, sourceLanguageCode: String? = nil, targetLanguageCodes: [String]? = nil, termCount: Int? = nil) {
            self.arn = arn
            self.createdAt = createdAt
            self.description = description
            self.directionality = directionality
            self.encryptionKey = encryptionKey
            self.format = format
            self.lastUpdatedAt = lastUpdatedAt
            self.message = message
            self.name = name
            self.sizeBytes = sizeBytes
            self.skippedTermCount = skippedTermCount
            self.sourceLanguageCode = sourceLanguageCode
            self.targetLanguageCodes = targetLanguageCodes
            self.termCount = termCount
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case createdAt = "CreatedAt"
            case description = "Description"
            case directionality = "Directionality"
            case encryptionKey = "EncryptionKey"
            case format = "Format"
            case lastUpdatedAt = "LastUpdatedAt"
            case message = "Message"
            case name = "Name"
            case sizeBytes = "SizeBytes"
            case skippedTermCount = "SkippedTermCount"
            case sourceLanguageCode = "SourceLanguageCode"
            case targetLanguageCodes = "TargetLanguageCodes"
            case termCount = "TermCount"
        }
    }

    public struct TextTranslationJobFilter: AWSEncodableShape {
        /// Filters the list of jobs by name.
        public let jobName: String?
        /// Filters the list of jobs based by job status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing and returns only the jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
        public let submittedAfterTime: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing and returns only the jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submittedBeforeTime: Date?

        @inlinable
        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submittedAfterTime: Date? = nil, submittedBeforeTime: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submittedAfterTime = submittedAfterTime
            self.submittedBeforeTime = submittedBeforeTime
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submittedAfterTime = "SubmittedAfterTime"
            case submittedBeforeTime = "SubmittedBeforeTime"
        }
    }

    public struct TextTranslationJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role that granted Amazon Translate read access to the job's input data.
        public let dataAccessRoleArn: String?
        /// The time at which the translation job ended.
        public let endTime: Date?
        /// The input configuration properties that were specified when the job was requested.
        public let inputDataConfig: InputDataConfig?
        /// The number of documents successfully and unsuccessfully processed during the translation job.
        public let jobDetails: JobDetails?
        /// The ID of the translation job.
        public let jobId: String?
        /// The user-defined name of the translation job.
        public let jobName: String?
        /// The status of the translation job.
        public let jobStatus: JobStatus?
        /// An explanation of any errors that may have occurred during the translation job.
        public let message: String?
        /// The output configuration properties that were specified when the job was requested.
        public let outputDataConfig: OutputDataConfig?
        /// A list containing the names of the parallel data resources applied to the translation job.
        public let parallelDataNames: [String]?
        /// Settings that modify the translation output.
        public let settings: TranslationSettings?
        /// The language code of the language of the source text. The language must be a language supported by Amazon Translate.
        public let sourceLanguageCode: String?
        /// The time at which the translation job was submitted.
        public let submittedTime: Date?
        /// The language code of the language of the target text. The language must be a language supported by Amazon Translate.
        public let targetLanguageCodes: [String]?
        /// A list containing the names of the terminologies applied to a translation job. Only one terminology can be applied per StartTextTranslationJob request at this time.
        public let terminologyNames: [String]?

        @inlinable
        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, inputDataConfig: InputDataConfig? = nil, jobDetails: JobDetails? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, message: String? = nil, outputDataConfig: OutputDataConfig? = nil, parallelDataNames: [String]? = nil, settings: TranslationSettings? = nil, sourceLanguageCode: String? = nil, submittedTime: Date? = nil, targetLanguageCodes: [String]? = nil, terminologyNames: [String]? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.jobDetails = jobDetails
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.message = message
            self.outputDataConfig = outputDataConfig
            self.parallelDataNames = parallelDataNames
            self.settings = settings
            self.sourceLanguageCode = sourceLanguageCode
            self.submittedTime = submittedTime
            self.targetLanguageCodes = targetLanguageCodes
            self.terminologyNames = terminologyNames
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case jobDetails = "JobDetails"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case message = "Message"
            case outputDataConfig = "OutputDataConfig"
            case parallelDataNames = "ParallelDataNames"
            case settings = "Settings"
            case sourceLanguageCode = "SourceLanguageCode"
            case submittedTime = "SubmittedTime"
            case targetLanguageCodes = "TargetLanguageCodes"
            case terminologyNames = "TerminologyNames"
        }
    }

    public struct TooManyTagsException: AWSErrorShape {
        public let message: String?
        public let resourceArn: String?

        @inlinable
        public init(message: String? = nil, resourceArn: String? = nil) {
            self.message = message
            self.resourceArn = resourceArn
        }

        private enum CodingKeys: String, CodingKey {
            case message = "message"
            case resourceArn = "ResourceArn"
        }
    }

    public struct TranslateDocumentRequest: AWSEncodableShape {
        /// The content and content type for the document to be translated. The document size must not exceed 100 KB.
        public let document: Document
        /// Settings to configure your translation output. You can configure the following options:   Brevity: not supported.   Formality: sets the formality level of the output text.   Profanity: masks profane words and phrases in your translation output.
        public let settings: TranslationSettings?
        /// The language code for the language of the source text. For a list of supported language codes, see Supported languages. To have Amazon Translate determine the source language of your text, you can specify auto in the SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to determine the source language.  If you specify auto, you must send the TranslateDocument request in a region that supports Amazon Comprehend. Otherwise, the request returns an error indicating that autodetect is not supported.
        public let sourceLanguageCode: String
        /// The language code requested for the translated document.   For a list of supported language codes, see Supported languages.
        public let targetLanguageCode: String
        /// The name of a terminology list file to add to the translation job. This file provides source terms and the desired translation for each term.  A terminology list can contain a maximum of 256 terms. You can use one custom terminology resource in your translation request. Use the ListTerminologies operation to get the available terminology lists. For more information about custom terminology lists, see Custom terminology.
        public let terminologyNames: [String]?

        @inlinable
        public init(document: Document, settings: TranslationSettings? = nil, sourceLanguageCode: String, targetLanguageCode: String, terminologyNames: [String]? = nil) {
            self.document = document
            self.settings = settings
            self.sourceLanguageCode = sourceLanguageCode
            self.targetLanguageCode = targetLanguageCode
            self.terminologyNames = terminologyNames
        }

        public func validate(name: String) throws {
            try self.document.validate(name: "\(name).document")
            try self.validate(self.sourceLanguageCode, name: "sourceLanguageCode", parent: name, max: 5)
            try self.validate(self.sourceLanguageCode, name: "sourceLanguageCode", parent: name, min: 2)
            try self.validate(self.targetLanguageCode, name: "targetLanguageCode", parent: name, max: 5)
            try self.validate(self.targetLanguageCode, name: "targetLanguageCode", parent: name, min: 2)
            try self.terminologyNames?.forEach {
                try validate($0, name: "terminologyNames[]", parent: name, max: 256)
                try validate($0, name: "terminologyNames[]", parent: name, min: 1)
                try validate($0, name: "terminologyNames[]", parent: name, pattern: "^([A-Za-z0-9-]_?)+$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case document = "Document"
            case settings = "Settings"
            case sourceLanguageCode = "SourceLanguageCode"
            case targetLanguageCode = "TargetLanguageCode"
            case terminologyNames = "TerminologyNames"
        }
    }

    public struct TranslateDocumentResponse: AWSDecodableShape {
        public let appliedSettings: TranslationSettings?
        /// The names of the custom terminologies applied to the input text by Amazon Translate to produce the translated text document.
        public let appliedTerminologies: [AppliedTerminology]?
        /// The language code of the source document.
        public let sourceLanguageCode: String
        /// The language code of the translated document.
        public let targetLanguageCode: String
        /// The document containing the translated content. The document format matches the source document format.
        public let translatedDocument: TranslatedDocument

        @inlinable
        public init(appliedSettings: TranslationSettings? = nil, appliedTerminologies: [AppliedTerminology]? = nil, sourceLanguageCode: String, targetLanguageCode: String, translatedDocument: TranslatedDocument) {
            self.appliedSettings = appliedSettings
            self.appliedTerminologies = appliedTerminologies
            self.sourceLanguageCode = sourceLanguageCode
            self.targetLanguageCode = targetLanguageCode
            self.translatedDocument = translatedDocument
        }

        private enum CodingKeys: String, CodingKey {
            case appliedSettings = "AppliedSettings"
            case appliedTerminologies = "AppliedTerminologies"
            case sourceLanguageCode = "SourceLanguageCode"
            case targetLanguageCode = "TargetLanguageCode"
            case translatedDocument = "TranslatedDocument"
        }
    }

    public struct TranslateTextRequest: AWSEncodableShape {
        /// Settings to configure your translation output. You can configure the following options:   Brevity: reduces the length of the translated output for most translations.   Formality: sets the formality level of the output text.   Profanity: masks profane words and phrases in your translation output.
        public let settings: TranslationSettings?
        /// The language code for the language of the source text. For a list of language codes, see Supported languages. To have Amazon Translate determine the source language of your text, you can specify auto in the SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to determine the source language.  If you specify auto, you must send the TranslateText request in a region that supports Amazon Comprehend. Otherwise, the request returns an error indicating that autodetect is not supported.
        public let sourceLanguageCode: String
        /// The language code requested for the language of the target text. For a list of language codes, see Supported languages.
        public let targetLanguageCode: String
        /// The name of a terminology list file to add to the translation job. This file provides source terms and the desired translation for each term.  A terminology list can contain a maximum of 256 terms. You can use one custom terminology resource in your translation request. Use the ListTerminologies operation to get the available terminology lists. For more information about custom terminology lists, see Custom terminology.
        public let terminologyNames: [String]?
        /// The text to translate. The text string can be a maximum of 10,000 bytes long. Depending on your character set, this may be fewer than 10,000 characters.
        public let text: String

        @inlinable
        public init(settings: TranslationSettings? = nil, sourceLanguageCode: String, targetLanguageCode: String, terminologyNames: [String]? = nil, text: String) {
            self.settings = settings
            self.sourceLanguageCode = sourceLanguageCode
            self.targetLanguageCode = targetLanguageCode
            self.terminologyNames = terminologyNames
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.sourceLanguageCode, name: "sourceLanguageCode", parent: name, max: 5)
            try self.validate(self.sourceLanguageCode, name: "sourceLanguageCode", parent: name, min: 2)
            try self.validate(self.targetLanguageCode, name: "targetLanguageCode", parent: name, max: 5)
            try self.validate(self.targetLanguageCode, name: "targetLanguageCode", parent: name, min: 2)
            try self.terminologyNames?.forEach {
                try validate($0, name: "terminologyNames[]", parent: name, max: 256)
                try validate($0, name: "terminologyNames[]", parent: name, min: 1)
                try validate($0, name: "terminologyNames[]", parent: name, pattern: "^([A-Za-z0-9-]_?)+$")
            }
            try self.validate(self.text, name: "text", parent: name, max: 10000)
            try self.validate(self.text, name: "text", parent: name, min: 1)
            try self.validate(self.text, name: "text", parent: name, pattern: "^[\\P{M}\\p{M}]{1,10000}$")
        }

        private enum CodingKeys: String, CodingKey {
            case settings = "Settings"
            case sourceLanguageCode = "SourceLanguageCode"
            case targetLanguageCode = "TargetLanguageCode"
            case terminologyNames = "TerminologyNames"
            case text = "Text"
        }
    }

    public struct TranslateTextResponse: AWSDecodableShape {
        /// Optional settings that modify the translation output.
        public let appliedSettings: TranslationSettings?
        /// The names of the custom terminologies applied to the input text by Amazon Translate for the translated text response.
        public let appliedTerminologies: [AppliedTerminology]?
        /// The language code for the language of the source text.
        public let sourceLanguageCode: String
        /// The language code for the language of the target text.
        public let targetLanguageCode: String
        /// The translated text.
        public let translatedText: String

        @inlinable
        public init(appliedSettings: TranslationSettings? = nil, appliedTerminologies: [AppliedTerminology]? = nil, sourceLanguageCode: String, targetLanguageCode: String, translatedText: String) {
            self.appliedSettings = appliedSettings
            self.appliedTerminologies = appliedTerminologies
            self.sourceLanguageCode = sourceLanguageCode
            self.targetLanguageCode = targetLanguageCode
            self.translatedText = translatedText
        }

        private enum CodingKeys: String, CodingKey {
            case appliedSettings = "AppliedSettings"
            case appliedTerminologies = "AppliedTerminologies"
            case sourceLanguageCode = "SourceLanguageCode"
            case targetLanguageCode = "TargetLanguageCode"
            case translatedText = "TranslatedText"
        }
    }

    public struct TranslatedDocument: AWSDecodableShape {
        /// The document containing the translated content.
        public let content: AWSBase64Data

        @inlinable
        public init(content: AWSBase64Data) {
            self.content = content
        }

        private enum CodingKeys: String, CodingKey {
            case content = "Content"
        }
    }

    public struct TranslationSettings: AWSEncodableShape & AWSDecodableShape {
        /// When you turn on brevity, Amazon Translate reduces the length of the translation output for most translations (when compared with the same translation with brevity turned off). By default, brevity is turned off. If you turn on brevity for a translation request with an unsupported language pair, the translation proceeds with the brevity setting turned off. For the language pairs that brevity supports, see Using brevity in the Amazon Translate Developer Guide.
        public let brevity: Brevity?
        /// You can specify the desired level of formality for translations to supported target languages. The formality setting controls the level of formal language usage (also known as register) in the translation output.  You can set the value to informal or formal. If you don't specify a value for formality, or if the target language doesn't support formality, the translation will ignore the formality setting. If you specify multiple target languages for the job, translate ignores the formality setting for any unsupported target language. For a list of target languages that support formality, see Supported languages in the Amazon Translate Developer Guide.
        public let formality: Formality?
        /// You can enable the profanity setting if you want to mask profane words and phrases in your translation output. To mask profane words and phrases, Amazon Translate replaces them with the grawlix string “?$#@$“. This 5-character sequence is used for each profane word or phrase, regardless of the length or number of words. Amazon Translate doesn't detect profanity in all of its supported languages. For languages that don't support profanity detection, see Unsupported languages in the Amazon Translate Developer Guide. If you specify multiple target languages for the job, all the target languages must support profanity masking. If any of the target languages don't support profanity masking, the translation job won't mask profanity for any target language.
        public let profanity: Profanity?

        @inlinable
        public init(brevity: Brevity? = nil, formality: Formality? = nil, profanity: Profanity? = nil) {
            self.brevity = brevity
            self.formality = formality
            self.profanity = profanity
        }

        private enum CodingKeys: String, CodingKey {
            case brevity = "Brevity"
            case formality = "Formality"
            case profanity = "Profanity"
        }
    }

    public struct UnsupportedDisplayLanguageCodeException: AWSErrorShape {
        /// Language code passed in with the request.
        public let displayLanguageCode: String?
        public let message: String?

        @inlinable
        public init(displayLanguageCode: String? = nil, message: String? = nil) {
            self.displayLanguageCode = displayLanguageCode
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case displayLanguageCode = "DisplayLanguageCode"
            case message = "Message"
        }
    }

    public struct UnsupportedLanguagePairException: AWSErrorShape {
        public let message: String?
        /// The language code for the language of the input text.
        public let sourceLanguageCode: String?
        /// The language code for the language of the translated text.
        public let targetLanguageCode: String?

        @inlinable
        public init(message: String? = nil, sourceLanguageCode: String? = nil, targetLanguageCode: String? = nil) {
            self.message = message
            self.sourceLanguageCode = sourceLanguageCode
            self.targetLanguageCode = targetLanguageCode
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case sourceLanguageCode = "SourceLanguageCode"
            case targetLanguageCode = "TargetLanguageCode"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the given Amazon Translate resource from which you want to remove the tags.
        public let resourceArn: String
        /// The initial part of a key-value pair that forms a tag being removed from a given resource. Keys must be unique and cannot be duplicated for a particular resource.
        public let tagKeys: [String]

        @inlinable
        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 512)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateParallelDataRequest: AWSEncodableShape {
        /// A unique identifier for the request. This token is automatically generated when you use Amazon Translate through an AWS SDK.
        public let clientToken: String
        /// A custom description for the parallel data resource in Amazon Translate.
        public let description: String?
        /// The name of the parallel data resource being updated.
        public let name: String
        /// Specifies the format and S3 location of the parallel data input file.
        public let parallelDataConfig: ParallelDataConfig

        @inlinable
        public init(clientToken: String = UpdateParallelDataRequest.idempotencyToken(), description: String? = nil, name: String, parallelDataConfig: ParallelDataConfig) {
            self.clientToken = clientToken
            self.description = description
            self.name = name
            self.parallelDataConfig = parallelDataConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.description, name: "description", parent: name, max: 256)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\P{M}\\p{M}]{0,256}$")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z0-9-]_?)+$")
            try self.parallelDataConfig.validate(name: "\(name).parallelDataConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case description = "Description"
            case name = "Name"
            case parallelDataConfig = "ParallelDataConfig"
        }
    }

    public struct UpdateParallelDataResponse: AWSDecodableShape {
        /// The time that the most recent update was attempted.
        public let latestUpdateAttemptAt: Date?
        /// The status of the parallel data update attempt. When the updated parallel data resource is ready for you to use, the status is ACTIVE.
        public let latestUpdateAttemptStatus: ParallelDataStatus?
        /// The name of the parallel data resource being updated.
        public let name: String?
        /// The status of the parallel data resource that you are attempting to update. Your update request is accepted only if this status is either ACTIVE or FAILED.
        public let status: ParallelDataStatus?

        @inlinable
        public init(latestUpdateAttemptAt: Date? = nil, latestUpdateAttemptStatus: ParallelDataStatus? = nil, name: String? = nil, status: ParallelDataStatus? = nil) {
            self.latestUpdateAttemptAt = latestUpdateAttemptAt
            self.latestUpdateAttemptStatus = latestUpdateAttemptStatus
            self.name = name
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case latestUpdateAttemptAt = "LatestUpdateAttemptAt"
            case latestUpdateAttemptStatus = "LatestUpdateAttemptStatus"
            case name = "Name"
            case status = "Status"
        }
    }
}

// MARK: - Errors

/// Error enum for Translate
public struct TranslateErrorType: AWSErrorType {
    enum Code: String {
        case concurrentModificationException = "ConcurrentModificationException"
        case conflictException = "ConflictException"
        case detectedLanguageLowConfidenceException = "DetectedLanguageLowConfidenceException"
        case internalServerException = "InternalServerException"
        case invalidFilterException = "InvalidFilterException"
        case invalidParameterValueException = "InvalidParameterValueException"
        case invalidRequestException = "InvalidRequestException"
        case limitExceededException = "LimitExceededException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case serviceUnavailableException = "ServiceUnavailableException"
        case textSizeLimitExceededException = "TextSizeLimitExceededException"
        case tooManyRequestsException = "TooManyRequestsException"
        case tooManyTagsException = "TooManyTagsException"
        case unsupportedDisplayLanguageCodeException = "UnsupportedDisplayLanguageCodeException"
        case unsupportedLanguagePairException = "UnsupportedLanguagePairException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize Translate
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// Another modification is being made. That modification must complete before you can make your change.
    public static var concurrentModificationException: Self { .init(.concurrentModificationException) }
    /// There was a conflict processing the request. Try your request again.
    public static var conflictException: Self { .init(.conflictException) }
    /// The confidence that Amazon Comprehend accurately detected the source language is low. If a low confidence level is acceptable for your application, you can use the language in the exception to call Amazon Translate again. For more information, see the DetectDominantLanguage operation in the Amazon Comprehend Developer Guide.
    public static var detectedLanguageLowConfidenceException: Self { .init(.detectedLanguageLowConfidenceException) }
    /// An internal server error occurred. Retry your request.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// The filter specified for the operation is not valid. Specify a different filter.
    public static var invalidFilterException: Self { .init(.invalidFilterException) }
    /// The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation.
    public static var invalidParameterValueException: Self { .init(.invalidParameterValueException) }
    ///  The request that you made is not valid. Check your request to determine why it's not valid and then retry the request.
    public static var invalidRequestException: Self { .init(.invalidRequestException) }
    /// The specified limit has been exceeded. Review your request and retry it with a quantity below the stated limit.
    public static var limitExceededException: Self { .init(.limitExceededException) }
    /// The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The Amazon Translate service is temporarily unavailable. Wait a bit and then retry your request.
    public static var serviceUnavailableException: Self { .init(.serviceUnavailableException) }
    ///  The size of the text you submitted exceeds the size limit. Reduce the size of the text or use a smaller document and then retry your request.
    public static var textSizeLimitExceededException: Self { .init(.textSizeLimitExceededException) }
    ///  You have made too many requests within a short period of time. Wait for a short time and then try your request again.
    public static var tooManyRequestsException: Self { .init(.tooManyRequestsException) }
    /// You have added too many tags to this resource. The maximum is 50 tags.
    public static var tooManyTagsException: Self { .init(.tooManyTagsException) }
    /// Requested display language code is not supported.
    public static var unsupportedDisplayLanguageCodeException: Self { .init(.unsupportedDisplayLanguageCodeException) }
    /// Amazon Translate does not support translation from the language of the source text into the requested target language. For more information, see Supported languages.
    public static var unsupportedLanguagePairException: Self { .init(.unsupportedLanguagePairException) }
}

extension TranslateErrorType: AWSServiceErrorType {
    public static let errorCodeMap: [String: AWSErrorShape.Type] = [
        "DetectedLanguageLowConfidenceException": Translate.DetectedLanguageLowConfidenceException.self,
        "TooManyTagsException": Translate.TooManyTagsException.self,
        "UnsupportedDisplayLanguageCodeException": Translate.UnsupportedDisplayLanguageCodeException.self,
        "UnsupportedLanguagePairException": Translate.UnsupportedLanguagePairException.self
    ]
}

extension TranslateErrorType: Equatable {
    public static func == (lhs: TranslateErrorType, rhs: TranslateErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension TranslateErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
